package com.simple.card.form;

import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Pattern;

@Data
public class UserLoginForm {

    @NotEmpty(message = "手机号码不能为空")
    @Pattern(regexp = "^1[34578]{1}\\d{9}$",message = "手机号码格式错误")
    private String phone;

    @NotEmpty(message = "验证码不能为空")
    @Pattern(regexp = "^\\d{4}$", message = "验证码格式错误")
    private String code;
}
